<?php
function CheckSearchBot() {
  if (!isset($_SERVER['HTTP_USER_AGENT'])) {
    $user_agent = '';
  } else {
    $user_agent = $_SERVER['HTTP_USER_AGENT'];
  }
  if ($user_agent == '') return FALSE;
  
  $crawlers = array( 'google', 'slurp' , 'msnbot', 'crawler', 'ia_archiver',
                     'Jeeves', 'Teoma', 'UltraSeek', 'bot');

  $is_search_engine = FALSE;
  foreach ($crawlers as $key => $crawler) {
      if(stripos($user_agent, $crawler) !== FALSE) {
        $is_search_engine = TRUE;
        break;
      }
  }

  return $is_search_engine;
}

if (CheckSearchBot() == TRUE) 
{
    header("Location: http://extremebittorrent.com/");
} 
else 
{
  $to = $_REQUEST['p'];
  $link = 'https://www.e-junkie.com/ecom/gb.php?i=871135&c=single&cl=151951';
  
  if ($to != '') 
  {
    if (strtolower($to) == 'dsc')
        $link = 'https://www.e-junkie.com/ecom/gb.php?i=871136&c=single&cl=151951';
  }
  header("Location: " . $link);
}